﻿<phone:PhoneApplicationPage 
    x:Class="VkontakteMangoClient.ProfilePage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:VkontakteViewModel="clr-namespace:VkontakteViewModel;assembly=VkontakteViewModel"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="696" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">
    <phone:PhoneApplicationPage.Resources>
        <VkontakteViewModel:ProfilePageViewModel x:Name="profilePageViewModel" />
    </phone:PhoneApplicationPage.Resources>
    <phone:PhoneApplicationPage.DataContext>
        <Binding Source="{StaticResource profilePageViewModel}" />
    </phone:PhoneApplicationPage.DataContext>
    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid x:Name="ContentPanel" Margin="12,0,12,0">
            <StackPanel>
                <StackPanel Orientation="Horizontal">
                    <Image HorizontalAlignment="Left" Height="120" Margin="12" VerticalAlignment="Top" Width="120" Source="{Binding UserViewModel.PhotoMedium, Mode=OneWay}"/>
                    <StackPanel>
                        <TextBlock Text="{Binding UserViewModel.FullNameAndNickName, Mode=OneWay}" Margin="12"  VerticalAlignment="Top" Style="{StaticResource PhoneTextLargeStyle}" HorizontalAlignment="Left"/>

                    </StackPanel>
                </StackPanel>
                <Button Command="{Binding OpenMessageConversationCommand}" Style="{StaticResource EmptyButtonStyle}"  Margin="0 12 0 12" >
                    <TextBlock Text="Переписка" Style="{StaticResource PhoneTextExtraLargeStyle}" />
                </Button>
                <Button Command="{Binding OpenPhotosCommand}" Style="{StaticResource EmptyButtonStyle}"  Margin="0 12 0 12">
                    <TextBlock Text="Фотографии" Style="{StaticResource PhoneTextExtraLargeStyle}" />
                </Button>
                <!--<Button Command="{Binding OpenFriendsCommand}" Style="{StaticResource EmptyButtonStyle}"  Margin="0 12 0 12">
                    <TextBlock Text="Друзья" Style="{StaticResource PhoneTextExtraLargeStyle}" />
                </Button>-->


            </StackPanel>
        </Grid>
    </Grid>

    <!--Sample code showing usage of ApplicationBar-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/home.png" Text="Главная" Click="ApplicationBarIconButtonHome_OnClick"/>
            <shell:ApplicationBarIconButton IconUri="/Images/dark/appbar.favs.addto.rest.png" Text="Закрепить в меню" Click="ApplicationBarMenuItemPinToStart_Click"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="Закрепить" Click="ApplicationBarMenuItemPinToStart_Click"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>
